import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:wx_faxian/const.dart';
import "../../components/discover_cell.dart";

class DiscoverPage extends StatefulWidget {
  const DiscoverPage({super.key});

  @override
  State<DiscoverPage> createState() => _DiscoverPageState();
}

class _DiscoverPageState extends State<DiscoverPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('发现'),
        backgroundColor: primaryColor,
        // 标题居中
        centerTitle: true,
        // 分割条
        elevation: 2,
      ),
      body: Container(
        height: 800,
        color: primaryColor,
        child: ListView(
          children: [
            DiscoverCell(
              title: '朋友圈',
              imageName: 'images/py.png',
            ),
            const SizedBox(height: 10),
            DiscoverCell(
              title: '扫一扫',
              imageName: 'images/sys.png',
            ),
            Row(
              children: [
                Container(width: 50, height: 0.5, color: Colors.white),
                Container(height: 0.5),
              ],
            ),
            DiscoverCell(
              title: '摇一摇',
              imageName: 'images/yyy.png',
            ),
            const SizedBox(height: 10),
            DiscoverCell(
              title: '看一看',
              imageName: 'images/kyk.png',
            ),
            Row(
              children: [
                Container(width: 50, height: 0.5, color: Colors.white),
                Container(height: 0.5),
              ],
            ),
            DiscoverCell(
              title: '搜一搜',
              imageName: 'images/souyisou.png',
            ),
            const SizedBox(height: 10),
            DiscoverCell(
              title: '附近的人',
              imageName: 'images/py.png',
            ),
            const SizedBox(height: 10),
            DiscoverCell(
              title: '购物',
              imageName: 'images/gw.png',
              subTitle: '腾讯官方购物平台',
              subImageName: 'true',
            ),
            Row(
              children: [
                Container(width: 50, height: 0.5, color: Colors.white),
                Container(height: 0.5),
              ],
            ),
            DiscoverCell(
              title: '游戏',
              imageName: 'images/yx.png',
            ),
            const SizedBox(height: 10),
            DiscoverCell(
              title: '小程序',
              imageName: 'images/xcx.png',
            ),
          ],
        ),
      ),
    );
  }
}
